package mianyang.zhangsan.com.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import mianyang.zhangsan.com.mapper.AdminMapper;
import mianyang.zhangsan.com.pojo.Admin;
import mianyang.zhangsan.com.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("adminService")
public class AdminServiceImpl implements AdminService {
    @Autowired
    private AdminMapper adminMapper;

    @Override
    public Admin queryInfoByUsername(String username) {
        QueryWrapper<Admin> wrapper = new QueryWrapper<>();
        wrapper.eq("username", username);
        return adminMapper.selectOne(wrapper);
    }
}
